Skip to content

bsdkm: fenrir and misc cleanup.#10734

Open
philljj wants to merge 1 commit into
wolfSSL:masterfrom
philljj:bsdkm_fixes
Open

bsdkm: fenrir and misc cleanup.#10734
philljj wants to merge 1 commit into
wolfSSL:masterfrom
philljj:bsdkm_fixes

Conversation

@philljj

@philljj philljj commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

Fenrir issues and misc cleanup.

Fixes F-1845, 1844, 2541, 1404, 1232, 3933, 3275, 702, 3932, 3724, 3018, 1403.

Testing

BSDKM_CFLAGS="-DWOLFSSL_BSDKM_VERBOSE_DEBUG -DWOLFSSL_BSDKM_FPU_DEBUG -DWOLFSSL_BSDKM_MEMORY_DEBUG"
                                                                                
./configure --enable-freebsdkm --enable-freebsdkm-crypto-register \
  --enable-cryptonly --enable-crypttests \
  --enable-kernel-benchmarks --enable-all-crypto --enable-aesni \
  --enable-aesni-with-avx \
  CFLAGS="$BSDKM_CFLAGS" && make \
  || exit 1

file bsdkm/libwolfssl.ko && sudo kldload bsdkm/libwolfssl.ko || exit 1
#!/bin/sh
./configure --enable-freebsdkm --enable-cryptonly --enable-crypttests \
  --enable-kernel-benchmarks --enable-all-crypto --enable-aesni \
  --enable-aesni-with-avx CFLAGS="-DWOLFSSL_BSDKM_VERBOSE_DEBUG" && make \
  || exit 1
file bsdkm/libwolfssl.ko && sudo kldload bsdkm/libwolfssl.ko || exit 1

Copilot AI review requested due to automatic review settings June 18, 2026 17:43
@philljj philljj self-assigned this Jun 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Addresses FreeBSD kernel module (BSDKM) “Fenrir” issues and performs cleanup aimed at improving debug behavior, error reporting, and robustness in AES GCM/CBC paths.

Changes:

  • Hardened FPU debug macros to behave safely as single statements (do { ... } while (0)).
  • Improved AES test error handling/logging and added initialization for AES-GCM test context.
  • Added guards against zero-length crypto cursor segments to avoid potential infinite loops and improved error messages.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
bsdkm/x86_vecreg.c Makes debug macros statement-safe via do { } while (0) wrappers.
bsdkm/wolfkmod_aes.c Adjusts AES test error defaults, improves error logs, adds session/allocation failure handling, and prints pass messages.
bsdkm/wolfkmod.c Fixes misleading error strings and adds seg_len==0 guards in GCM cursor loops.
bsdkm/bsdkm_wc_port.h Avoids double-evaluating allocation size in debug XMALLOC macro by caching (s) into _sz.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bsdkm/wolfkmod_aes.c
Comment thread bsdkm/wolfkmod_aes.c
Comment thread bsdkm/wolfkmod_aes.c
@philljj philljj added the Not For This Release Not for release 5.9.2 label Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Not For This Release Not for release 5.9.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants